<%@ page language="java" import="java.util.*,com.ts.common.util.bean.*,com.ts.web.service.ICommonService,com.ts.common.util.BeanFactory" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %> 
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

  <head>
    <base href="<%=basePath%>" />
    
    <title>admins</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    

	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

   <script type="text/javascript">
function check_form(f1){
  if(f1.title.value.length==0){
	  alert("标题不能为空"); 
	  return false;
  }return true;
}
</script>
  </head>
  
  <body>
<c:if test="${!empty message}">
  	<script type="text/javascript">
  		var msg="${message}";
  		alert(msg);
  	</script>
  	<c:remove var="message"/>
  </c:if>
<%
    ICommonService ic = (ICommonService) BeanFactory
			.getBean(BeanFactory.COMMONSERVICE);
 	List<Itemmm> list = null;
    list = ic.getItemmm();


 %>
 <form enctype="multipart/form-data"  method="post" action="<c:url value='/admin.do?method=updateCasesOk'/>" name="f1" onSubmit="return check_form(f1)">
<div class="biaoti" style="clear:both">
项目类型：<select name="type" style="width: 120px;height: 20px;"><option value="${itemmms.title }">${itemmms.title }</option><%for(Itemmm itemmm : list){
  %><option value="<%=itemmm.getId() %>"><%=itemmm.getTitle() %></option><%} %></select></div><br/>
<div class="biaoti" style="clear:both">案例名称：<input type="text" style="width:320px; height:20px;" value="${cases.title }" name="title" id="title"/></div><br/>
<div class="biaoti" style="clear:both">户型：<input type="text" style="width:100px; height:20px;" value="${cases.huxing }" name="huxing" id="huxing"/></div><br/>
<div class="biaoti" style="clear:both">面积：<input type="text" style="width:100px; height:20px;" value="${cases.mianji }" name="mianji" id="mianji"/></div><br/>
<div class="biaoti" style="clear:both">金额：<input type="text" style="width:100px; height:20px;" value="${cases.money }" name="money" id="money"/></div><br/>
<div class="biaoti" style="clear:both">显示图片：<img src="${cases.url }" width="120" height="120" /></div><br/>  
<div class="biaoti" style="clear:both">工程地址：<input type="text" style="width:320px; height:20px;" value="${cases.address }" name="address" id="address"/></div><br/>  
<div class="biaoti" style="clear:both">案例说明：<textarea  style="width:260px; height:60px;"  name="miaoshu" id="miaoshu"> ${cases.miaoshu }</textarea></div><br/>  
    <div style="height:300px; padding-left:30px;">
     
      <input type="hidden" id="content" name="content"/>
	<FCK:editor instanceName="rz_content" toolbarSet="Tongji" width="600px" height="300px">
          <jsp:attribute name="value">
				<jsp:include page="/${cases.content}"></jsp:include>
		  </jsp:attribute> 
   </FCK:editor>
    </div>
   <div style="margin-top:20px; margin-left:30px; width:600px; height:35px; background:#eae7e8"> 
    
      <input type="hidden" name="id" value="${cases.id }"/>
       <input type="submit" name="yulan" class="subtn" value="发布"  />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
       <input type="reset" name="tijiao" class="subtn" value="重置"  />
       </div>
  </form>   
  </body>
</html>
